Skip to content

Bug 2034484: feat: bumped library-go version#166

Merged
openshift-merge-robot merged 4 commits intoopenshift:masterfrom
eggfoobar:leader_election_config
Dec 22, 2021
Merged

Bug 2034484: feat: bumped library-go version#166
openshift-merge-robot merged 4 commits intoopenshift:masterfrom
eggfoobar:leader_election_config

Conversation

@eggfoobar
Copy link
Copy Markdown
Contributor

This should take advantage of leader election changes for SNO clusters proposed in this library-go PR.

Changes:

  • added conventional defaults for leader election
  • added cluster query for leader election for SNO environments
    • at start up operator will query if it is currently in a SNO or HA topology and set LE Config respective of those environments

Signed-off-by: ehila ehila@redhat.com

@openshift-ci openshift-ci Bot requested review from dcbw and fedepaol December 13, 2021 16:51
Comment thread main.go

ptpv1 "github.com/openshift/ptp-operator/api/v1"
"github.com/openshift/ptp-operator/controllers"
"github.com/openshift/ptp-operator/pkg/leaderelection"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the leaderelection implementation specific to ptp-operator? Why aren't you just importing https://github.com/openshift/library-go/blob/master/pkg/config/leaderelection/leaderelection.go here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @josephdrichard You're right this isn't specific to ptp-operator. When the PR was opened there was a breaking dependency change between the k8s-23 libs and controller-runtime. It was causing some problems and I figured a bit of code was the better approach for now since library-go wasn't being used else where in the code. Luckily, controller-runtime was updated a few hours so we can import it now.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you still looking to update this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies, forgot to mention in the reply. This PR has been updated with the latest library-go code and I'm using those methods to drive the leaderelection configs

updated to use latest library-go for leader election
 - at start up operator will query if it is currently in a SNO or HA topology and set LE Config respective of those environments
updated controller-runtime to latest

Signed-off-by: ehila <ehila@redhat.com>
@eggfoobar eggfoobar force-pushed the leader_election_config branch from 21f19d6 to 57db8c3 Compare December 15, 2021 04:18
@josephdrichard
Copy link
Copy Markdown
Contributor

Was this tested on a running cluster?

updated rbac permissions to read infrastructure objects for leader election

Signed-off-by: ehila <ehila@redhat.com>
@eggfoobar
Copy link
Copy Markdown
Contributor Author

Was this tested on a running cluster?

Hey @josephdrichard, for testing this operator I have been relying on the CI cluster to validate that the correct leader election config is being applied. The correct config was applied in there, updated the rbac permissions since I had missed to generate those.

Signed-off-by: ehila <ehila@redhat.com>
@eggfoobar
Copy link
Copy Markdown
Contributor Author

/retitle Bug 2034484: feat: bumped library-go version
This PR bumps to latest library-go to utilize changes for performance gains on SNO DU clusters

@openshift-ci openshift-ci Bot changed the title feat: updated leader election config and cluster info Bug 2034484: feat: bumped library-go version Dec 21, 2021
@openshift-ci openshift-ci Bot added bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Dec 21, 2021
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Dec 21, 2021

@eggfoobar: This pull request references Bugzilla bug 2034484, which is valid. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.10.0) matches configured target release for branch (4.10.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

No GitHub users were found matching the public email listed for the QA contact in Bugzilla (jhou@redhat.com), skipping review request.

Details

In response to this:

Bug 2034484: feat: bumped library-go version

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Signed-off-by: ehila <ehila@redhat.com>
@eggfoobar
Copy link
Copy Markdown
Contributor Author

/retest-required

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Dec 22, 2021

@eggfoobar: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@josephdrichard
Copy link
Copy Markdown
Contributor

/lgtm /approved

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 22, 2021
@josephdrichard
Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Dec 22, 2021
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Dec 22, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eggfoobar, josephdrichard

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit fe257e8 into openshift:master Dec 22, 2021
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Dec 22, 2021

@eggfoobar: Some pull requests linked via external trackers have merged:

The following pull requests linked via external trackers have not merged:

These pull request must merge or be unlinked from the Bugzilla bug in order for it to move to the next state. Once unlinked, request a bug refresh with /bugzilla refresh.

Bugzilla bug 2034484 has not been moved to the MODIFIED state.

Details

In response to this:

Bug 2034484: feat: bumped library-go version

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

josephdrichard added a commit to josephdrichard/ptp-operator that referenced this pull request Jan 23, 2026
jzding pushed a commit to jzding/ptp-operator that referenced this pull request Mar 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants